//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using CommunityServer.Components;
using CommunityServer.ControlPanel.Controls;
using CommunityServer.ControlPanel.UI;
using CommunityServer.Controls;
using ResourceLinkButton = CommunityServer.ControlPanel.Controls.ResourceLinkButton;

namespace CommunityServer.ControlPanel.PhotoAdmin
{
	/// <summary>
	/// Summary description for GroupForm.
	/// </summary>
	public class RoleQuotaForm : BaseGalleryAdminPage
	{
		protected ResourceLinkButton Save;
		protected MPContent bcr;
		protected RoleQuotaEditControl RoleQuotaEditControl1;

		private void Page_Load(object sender, EventArgs e)
		{
			CSContext context = CSContext.Current;
			context.RoleID = RoleQuotaEditControl1.RoleID = new Guid(context.QueryString["RoleID"]);

			
			Head.AddTitle("Gallery Owner Quota Editor", this.Context);
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
			this.Save.Click += new EventHandler(Save_Click);
		}

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new EventHandler(this.Page_Load);

		}
		#endregion

		private void Save_Click(object sender, EventArgs e)
		{
			if(Page.IsValid)
			{
				if(RoleQuotaEditControl1.Save())
					Modal.ClosePage(Page) ;
			}
		}


	}
}
